package cn.sx10.service.impl;

import cn.sx10.dao.StudentDao;
import cn.sx10.dao.impl.studentDaoimpl;
import cn.sx10.model.Student;
import cn.sx10.service.StudentService;

import java.util.List;

public class StudentServiceImpl implements StudentService {
    StudentDao studentDao = new studentDaoimpl();

    @Override
    public List<Student> singleDemand(int studentno) {
        return studentDao.singleDemand(studentno);
    }

    @Override
    public List<Student> findAll() {
            return studentDao.findAll();
    }

    @Override
    public int delete(int studentno) {
        return studentDao.delete(studentno);
    }

    @Override
    public boolean findAdd(Student student) {
        return studentDao.findAdd(student)>0?true:false;
    }

    @Override
    public Student modifyview(String studentno) {
        return studentDao.modifyview(studentno);
    }

    @Override
    public boolean modify(Student student) {
        return studentDao.modify(student)>0?true:false;
    }

    @Override
    public boolean queryNum(String studentNo) {
        return studentDao.queryNum(studentNo);
    }

    @Override
    public List<Student> search(Student student) {
        return studentDao.search(student);
    }
}
